package com.qy.controller;

import com.qy.entity.Clazz;
import com.qy.mapper.ClazzMapper;
import com.qy.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author 袁大毛
 * * @date 2024/10/17 下午3:04
 * @描述
 */
@Controller
@ResponseBody
@RequestMapping("/clazz")
public class ClazzController {
    @Autowired
    private ClazzMapper clazzMapper;
    @GetMapping("/getAll")
    public R getAll(){
        List<Clazz> clazzes = clazzMapper.selectAll();
        return R.ok(clazzes);
    }
}